package vashion.azeroth.core.service.impl;

import vashion.azeroth.core.service.OperateCommissions;

//import com.taobao.api.domain.Order;

public class OperateCommissionsImpl implements OperateCommissions{

	
	/**
	 * 获取佣金
	 * 精选的商品链接中带商品佣金，隐性属性，不显示
	 * 如果购买者是发布者的下线会员，通过商品链接购买，佣金上下线平分，即50%佣金返现到购买者的V币，50%佣金到发布者的V币
	 * 
	 * dealPrice  //成交价格
	 * commPercent //佣金比例
	 * type=1需要平分佣金，type＝2不需要平分
	 * 
	 * 缺失V币与佣金、成交金额的对应关系，待订单部分接口开发完成后再补充
	 * 
	 * */
	
//	@Override
	public double getCommissions(double dealPrice, double commPercent, int type) {
//		double dealPrice = 0.0;
//		double commPercent = 0.1;
////		int type = 1;
//		
		double commissions = 0.0;
//		Order orederInfo = new Order();
//		orederInfo.getBuyerNick();
//		orederInfo.getSellerNick();
//		if (type == 2) {
//			commissions = dealPrice*commPercent;
//		}else if (type == 1) {
//			commissions = dealPrice*commPercent/2;
//		}
//		
//		
		return commissions;
	}

//	@Override
	public double OperateVCoin() {
		// TODO Auto-generated method stub
		return 0;
	}

	
}
